package org.snail.proxy.server.netty;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.LengthFieldBasedFrameDecoder;
import org.snail.proxy.proto.NetConstants;

/**
 * @author fxd
 * @version 1.0.0
 * @ClassName PackageSpliter.java
 * @Description TODO
 * @createTime 2022年03月02日 17:47:00
 */
public class PackageSpliter extends LengthFieldBasedFrameDecoder {
    public PackageSpliter() {
        super(Integer.MAX_VALUE, NetConstants.LENGTH_OFFSET,NetConstants.LENGTH_BYTES_COUNT);
    }

    @Override
    protected Object decode(ChannelHandlerContext ctx, ByteBuf in) throws Exception {
        return super.decode(ctx, in);
    }
}
